﻿using FluentNHibernate.Mapping;

namespace NMA.Infrastructure.NHibernate.Mapping
{
    using NMA.Infrastructure.NHibernate.DomainObject;

    public class AuditMap : ClassMap<Audit>
    {
        public AuditMap()
        {
            Table("[NMA].[dbo].[Audit]");            
            Id(x => x.Id, "ID").GeneratedBy.Guid();
            Map(x => x.UserName, "UserName").Not.Nullable().Length(30);
            Map(x => x.UserAction, "UserAction").Not.Nullable().Length(100);
            Map(x => x.DateEvent, "DateEvent").Not.Nullable();
        }
    }
}